package com.services.impl;

import com.daos.UserMapper;
import com.services.IndexService;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Created by Administrator on 2016/5/18 0018.
 */
@Service("indexService")
public class IndexServiceImpl implements IndexService {

    static Logger logger = Logger.getLogger ( IndexServiceImpl.class.getName () ) ;
    @Autowired
    private UserMapper userMapper;
    @Override
    public String getCode() {
        logger.error(userMapper.selectByPrimaryKey(1).getName());
        return userMapper.selectByPrimaryKey(1).getName();
    }
}
